package com.sun.utils;

import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Component;
import xyz.downgoon.snowflake.Snowflake;

@Component
public class IdGenerator {

    private Snowflake snowflake;

    @PostConstruct
    public void init() {
        this.snowflake = new Snowflake(01, 01);
    }

    public Long next() {
        return snowflake.nextId();
    }

}
